package com.example.app;

import com.example.bean.Cat;
import com.example.bean.Dog;
import org.springframework.context.annotation.AnnotationConfigApplicationContext;

public class app5 {
    public static void main(String[] args) {
        AnnotationConfigApplicationContext applicationContext =new AnnotationConfigApplicationContext();
        applicationContext.register(Dog.class);
        applicationContext.registerBean("Cat", Cat.class);

        String[] beans = applicationContext.getBeanDefinitionNames();
        for (String bean : beans) {
            System.out.println(bean);
        }
    }
}
